Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(prover): Add FFLONK support to compressor #2766

Closed
wants to merge 127 commits into from
Closed

Conversation

itegulov
Copy link
Contributor

@itegulov itegulov commented Aug 29, 2024

What ❔

Enables support of FFLONK compression

  • Compressor now can be run with --flonk=true flag to run compressor in FFLONK mode(or by running zkstack prover run --component compressor --mode=fflonk), default mode is still PLONK
  • Final proof is now an enum: it can be either L1BatchProofForL1::Fflonk or L1BatchProofForL1::Plonk containing the proof inside
  • We are now making use out of compression_mode environment variable - FFLONK compressor can be run in 5 modes - 5th one is the most effective, so default value is 5.
  • VK setup data generator is updated to generate setup and verification keys for FFLONK as well.

TODO:

  1. [BLOCKED] Test this PR e2e with contracts that are updated to support FFLONK (they were not available during my work but hopefully are by the time you are reading this). I expect there to be some friction in serialization format expected by EVM. I took code suggested by Sait but it is completely untested.

Changes:

  • VK generation - with GPU and 4 threads takes ~20m

Why ❔

Checklist

  • PR title corresponds to the body of PR (we generate changelog entries from PRs).
  • Tests for the changes have been added / updated.
  • Documentation comments have been added / updated.
  • Code has been formatted via zk fmt and zk lint.

Artemka374 and others added 29 commits November 13, 2024 14:34
# Conflicts:
#	prover/crates/bin/circuit_prover/src/circuit_prover.rs
#	prover/crates/bin/circuit_prover/src/lib.rs
#	prover/crates/bin/circuit_prover/src/witness_vector_generator.rs
#	zkstack_cli/crates/zkstack/completion/zkstack.fish
#	zkstack_cli/crates/zkstack/completion/zkstack.sh
# Conflicts:
#	core/lib/l1_contract_interface/src/i_executor/methods/prove_batches.rs
#	core/node/eth_watch/src/client.rs
#	core/node/eth_watch/src/tests.rs
#	prover/Cargo.lock
@Artemka374 Artemka374 closed this Jan 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants